import React, { Component } from 'react'
import css from './App.module.css';
import Head from './components/Header';
import {Route,Switch,Redirect } from 'react-router-dom';
import About from './pages/About';
import Home from './pages/Home';
import MyNavLink from './components/MyNavLink';
export default class App extends Component {
  render() {
    return (
      <div className={css.routerHead}>
        <Head/>
        <div className={css.flex}>
          <div className={css.routerNav}>
            <MyNavLink to="/about" a={1} b={1} c={1}>About</MyNavLink>
            <MyNavLink to="/home">Home</MyNavLink>
          </div>
          <div>
            <Switch>
              <Route path="/about" component={About}></Route>
              <Route path="/home" component={Home}></Route>
              <Redirect to="/about" />
            </Switch>
          </div>
        </div>
        
      </div>
    )
  }
}
